package ru.alt22.visor.php.ui;

import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;

/**
 * The activator class controls the plug-in life cycle
 */
public class PDToolsUIPlugin extends AbstractUIPlugin {

	public static final String PLUGIN_ID = "ru.alt22.visor.php.ui";

	private static PDToolsUIPlugin plugin;
	
	public PDToolsUIPlugin() {
		plugin = this;
	}

	public void start(BundleContext context) throws Exception {
		super.start(context);
	}

	public void stop(BundleContext context) throws Exception {
		plugin = null;
		super.stop(context);
	}

	public static PDToolsUIPlugin getDefault() {
		return plugin;
	}

	public static ImageDescriptor getImageDescriptor(String path) {
		return getImageDescriptor(PLUGIN_ID, path);
	}

	public static ImageDescriptor getImageDescriptor(String pluginId, String path) {
		return imageDescriptorFromPlugin(pluginId, path);
	}

}